feat!(ranking): Add new methods for the different ranking modes on GetRanking #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's 5 different types of GetRanking call, asking for:
These are pretty fundamentally different requests that would need different db queries, etc. at the implementation level. Notably all but the first need knowledge of the PID of the user making the request (to get their rank and their friends).
Changes:
Add new methods to the protocol for each of these use cases.
Submitting as a draft because I know
if rankingMode.Value == 0 {
is the wrong way to do it, but I couldn't find any other protocol with constants like that for me to reference against. If someone count point out where I should define constants for this sort of thing I'll happily clean up the magic numbers.There's a highly WIP implementation of this API here: https://github.com/ashquarky/puyo-wiiu/blob/ranking/datastore/puyo_ranking.go
Note the dramatically different database requests needed for each mode.